﻿@using EmoneyWeiXinEntity;
@using ActivtyUI.Controllers;
@using System.Web.Mvc;
@using EmoneyWeiXinCommon;
@{
    ViewBag.Title = "ResultPage";
    ActivityDataEntity entity = ViewBag.ActData;
    ResultWenAn wenan = ViewBag.wenan;
}
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>测吸金颜值</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <script src="@Url.Content("~/js/jquery.js")?a=@(new Random().Next(10000))"></script>
    <link href="@Url.Content("~/css/ShuaLian/css/basic.css")?a=@(new Random().Next(10000))" rel="stylesheet" />
    <script src="@Url.Content("~/js/jweixin-1.0.0.js")"></script>
    <script src="@Url.Content("~/js/WeiXinCommon.js")"></script>
</head>
<body class="body">
    <div class="box">
        <div class="bg02">
            <h2>传照片测赚钱能力</h2>
            <div class="main">
                <h3>
                    <div class="photo">
                        <img src="@entity.headimgUrl">
                    </div>
                </h3>
                <div class="result">
                    <img src="~/images/ShuaLian/@wenan.imgFile">
                </div>

                @*  <p class="main_font04 hongbao"><a href="javascript:void(0)" id="getRedBag">点击领取红包</a></p>*@

                <p class="main_font05">已有<span>@(int.Parse(System.DateTime.Now.ToString("HHmmss")) + 9999)</span>人来吸金</p>
                <p class="main_font06"><a href="http://mp.weixin.qq.com/s?__biz=MzAxMTA0ODM3Mw==&mid=215697034&idx=1&sn=9c147cb2e6295a036bf5eab8a9f27f4c#rd" style="color: white;">据说有钱人都会点这里</a><img src="~/images/ShuaLian/main_img02.png"></p>
            </div>
        </div>
        <footer class="footer footer02">
            <a href="http://mp.weixin.qq.com/s?__biz=MzAxMTA0ODM3Mw==&mid=215697034&idx=1&sn=9c147cb2e6295a036bf5eab8a9f27f4c#rd">益盟股票分析&nbsp;帮您选股+解析<img src="~/images/ShuaLian/footer_img.png"></a>
        </footer>
    </div>

    <div class="share" style="display: none">
        <h3>
            <img src="@Url.Content("~/images/ShuaLian/share.png")"></h3>
        <p>
            点击右上角“...”分享朋友圈,晒出你的模样<br>
            看谁来迎战,<br>
            告诉他们，咱就是靠脸吃饭的。
        </p>
    </div>
</body>

</html>

@{
    weixinUserEntity wxInfo = ViewBag.wxInfo as weixinUserEntity; 
}

@*<script type="text/javascript">
    $(function () {
        $("#getRedBag").click(function () {
            $.ajax({
                type: 'post',
                async: false,
                url: '@Url.Action("TiXian", "ShuaLian")',
                data: { openid: '@ViewBag.openid' },
                success: function (data) {
                    alert(data)
                }
            });
        });
    });
</script>*@

@*  关于微信分享部分的代码*@
<script type="text/javascript">
    var AppId = "@wxInfo.AppId";
    var AppSercret = "@wxInfo.AppSecret";
    var goUrl = "@Config.Host_Url3" + "ShuaLian/ShareUrlInput";
    var shareUrl = "@Config.ShareJQUrl";
    var weixinId = "@wxInfo.id";
    var timestamp = "@ViewBag.timestamp";
    var imgUrl = "@entity.headimgUrl";
    var tTitle = "@wenan.str1 @wenan.str2";
    var tContent = "@wenan.str4";
    var nonceStr = "@ViewBag.nonceStr";
    var signature = "@ViewBag.signature";

    $(function () {
        initSharePara();
        $("html").addClass("tt");
        $(".share").show(1).delay(4000).hide(1, 0, hideShare);
    });

    function hideShare() {
        $("html").removeClass("tt");
        $(".share").hide();
        $(".share").removeClass("win");
    }
    ///初始化分享到朋友圈的功能
    function initSharePara() {
        goUrl = goUrl + "?weixinId=" + '@wxInfo.id' + "&fromOpenid=" + '@ViewBag.openid';
        goUrl = encodeURIComponent(goUrl);
        shareUrl = shareUrl + "?goUrl=" + goUrl + "&weixinId=" + '@wxInfo.id'
        mysharetime(shareUrl, imgUrl, tTitle, tContent, AppId, timestamp, nonceStr, signature, function () {

        });
    }
</script>

